<#--
    List of variables to be passed for this template:
        - PersistenceUnitName: String containing the persistance unit name.
        - ConnectionString: String containing the connection properties.
            Example: "jdbc:mysql://localhost:3306/NanoSNFramework_Polls"
        - UserName: database username.
        - Password: database password.
        - JDBCdriver: "com.mysql.jdbc.Driver"
        - Classes

-->
<@pp.dropOutputFile />
<@pp.changeOutputFile name="persistence.xml" /><?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="${PersistenceUnitName}" transaction-type="RESOURCE_LOCAL">
  </persistence-unit>
  <persistence-unit name="Development-${PersistenceUnitName}" transaction-type="RESOURCE_LOCAL">
        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<#list Classes as class >
        <class>${class}</class>
</#list>
        <properties>
      <!--<property name="openjpa.Log" value="DefaultLevel=ERROR, Tool=ERROR"/>-->
            <property name="openjpa.Log" value="DefaultLevel=TRACE, Tool=TRACE"/>
            <property name="openjpa.ConnectionUserName" value=""/>
            <property name="openjpa.ConnectionPassword" value=""/>
            <property name="openjpa.ConnectionURL" value="jdbc:derby:db.db;create=true"/>
            <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
        </properties>
  </persistence-unit>
</persistence>
